﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace OpenBlock.ResourceManagement
{
    [StructLayout(LayoutKind.Explicit, Size = sizeof(uint))]
    public struct ResRef
    {
        [FieldOffset(0)] internal uint combine;
        [FieldOffset(0)] internal ushort moduleId;
        [FieldOffset(2)] internal ushort resId;
        public static ResRef FromUInt32(uint val) => new ResRef { combine = val };
        public uint AsUInt32() => combine;
    }
}
